-
Notifications
You must be signed in to change notification settings - Fork 5.5k
update types for hosted link #14113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update types for hosted link #14113
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (1)
WalkthroughThe changes introduce optional properties to the Changes
Suggested reviewers
Poem
Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
packages/sdk/src/server/index.ts (3)
49-53: LGTM with a minor suggestion for documentation.The addition of the
success_redirect_uriproperty is a good improvement, allowing for more flexible user flows after a successful connection.Consider adding a brief example in the documentation comment to illustrate the usage, like this:
/** * The optional url to redirect the user to upon successful connection. * @example "https://your-app.com/connection-success" */ success_redirect_uri?: string;
55-58: LGTM with a minor suggestion for documentation.The addition of the
error_redirect_uriproperty complements thesuccess_redirect_uri, providing a complete set of redirection options for different connection outcomes.Consider adding a brief example in the documentation comment to illustrate the usage, like this:
/** * The optional url to redirect the user to upon failed connection. * @example "https://your-app.com/connection-error" */ error_redirect_uri?: string;
96-99: LGTM with suggestions for improvement.The addition of the
connect_link_urlproperty to theConnectTokenResponsetype is a valuable enhancement, providing the URL for the Hosted Link.Consider the following improvements:
- Enhance the documentation comment for clarity:
/** * The URL of the Hosted Link where users can complete the connection process. * @example "https://connect.pipedream.com/oauth/authorize?token=abc123" */ connect_link_url: string;
- If this URL is always present in the response, the current type definition is correct. However, if it's optional in some cases, consider changing it to:
connect_link_url?: string;Please verify the optionality of this field and adjust the type if necessary.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- packages/sdk/src/server/index.ts (2 hunks)
🔇 Additional comments (1)
packages/sdk/src/server/index.ts (1)
Line range hint
1-599: Summary of changes and their impactThe changes in this file enhance the Pipedream Connect API client by:
- Adding optional redirect URIs for successful and failed connections in the
ConnectTokenCreateOptstype.- Including the Hosted Link URL in the
ConnectTokenResponsetype.These additions improve the flexibility of the connection process and provide developers with more control over the user flow. The changes are well-implemented and correctly typed.
To further improve the code:
- Consider adding example usage in the documentation comments for the new properties.
- Verify the optionality of the
connect_link_urlproperty in theConnectTokenResponsetype.Overall, these changes positively impact the functionality and usability of the Pipedream Connect API client.
WHY
Summary by CodeRabbit